#
# spectClean/src/fold/test
#

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/core)
include_directories(${Qwt6_INCLUDE_DIR})

# === Build fitting test function
add_executable(fold_test src/sin_fit_test.cpp)
set_target_properties(fold_test PROPERTIES
    COMPILE_FLAGS ${OpenMP_CXX_FLAGS}
    LINK_FLAGS ${OpenMP_CXX_FLAGS}
)
target_link_libraries(fold_test
    core
    fold
    gsl
    cblas
    ${QT_QTCORE_LIBRARY}
)
add_test(fold_test fold_test)


# === QtTest unit testing.
qt4_wrap_cpp(fold_test_MOC QTest_Fold.h)
add_executable(qtest_fold ${fold_test_MOC})
target_link_libraries(qtest_fold
    fold
    plot_widget
    core
    ${Qwt6_Qt4_LIBRARY}
    ${QT_QTTEST_LIBRARY}
    ${QT_QTGUI_LIBRARY}
)
